﻿@model IEnumerable<Article>
@Html.Extra()

@{
    var index = 1;
    var url = "";
}

@foreach (var item in Model)
{
    if (item.TitleImageType == 1)
    {
        <div class='clearfix article three-article feedlist'>
            <div class="words">
                <div class="part1 clearfix">
                    <div class="title" style="padding-bottom: 10px">
                        <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]&articleId=@item.Id" target="_blank">@StringHelper.CutText(item.Title, 35)</a>
                    </div>
                </div>
            </div>

            <div class="img">
                <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]" target="_blank">
                    <img src="@item.TitleImageUrl1" onerror="javascript:this.src='https://www.qctt.cn/images/gray.png'" alt="">
                </a>
                <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]" target="_blank">
                    <img src="@item.TitleImageUrl2" onerror="javascript:this.src='https://www.qctt.cn/images/gray.png'" alt="">
                </a>
                <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]" target="_blank">
                    <img src="@item.TitleImageUrl3" onerror="javascript:this.src='https://www.qctt.cn/images/gray.png'" alt="">
                </a>
            </div>
            <div class="words">
                <div class="part1 clearfix">
                    <div class="title">
                    </div>

                    <div class="part2">
                        <span class="icon-time iconfont"> @StringHelper.FormatDate(item.PublishTime, "MM/dd")</span>
                        @*<span  class="icon-pinglun iconfont">
                            @item.CommentCount</span>*@
                        <span class="iconfont icon-view"> @item.ViewCount</span>
                        @*<span class="iconfont icon-like"> @item.ClickGoodCount</span>*@
                    </div>

                </div>

                @if (Request["page"] != "sp")
                {
                    <div class="part3">
                        <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]" class="word" target="_blank">
                            @StringHelper.CutText(item.Summary, 45)
                        </a>
                    </div>
                }
            </div>
        </div>
    }
    else
    {
        <div class='clearfix @((Request["page"] == "sp" || Request["page"] == "live") ? "video-wrap" : "article") feedlist'>
            <div class="img">

                @if (item.CatalogType == CatalogType.QPH)
                {
                    url = "/?page=qph&tthId=" + item.Id;

                    <a href="@(url)" target="_blank">
                        <img src="@item.ImageUrl" onerror="javascript:this.src='https://www.qctt.cn/images/gray.png'" alt="">
                    </a>
                }
                else
                {
                           url = "/Articles/Detail?key=" + item.Key + "&page=" + Request["page"];

                            <a href="@(url)" target="_blank">
                                <img src="@item.TitleImageUrl" onerror="javascript:this.src='https://www.qctt.cn/images/gray.png'" alt="">
                            </a>
               
                }

                @if ((Request["page"] == "sp" || Request["page"] == "live"))
                {
                    <a href="/Articles/Detail?key=@item.Key&page=@Request["page"]" target="_blank">
                        <img class="play-icon" src="../../../App_Content/2.0/images/play.png">
                    </a>
                }
            </div>
            <div class="words">
                <div class="part1 clearfix">
                    <div class="title">
                        <a href="@(url)" target="_blank">@StringHelper.CutText(item.Title, 35)</a>

                        @if (@item.Author != null)
                        {
                            <div style="color: #333;font-size: 14px;margin-top:4px">
                                @item.Author
                            </div>
                        }

                    </div>
                </div>

                    @if (item.CatalogType != CatalogType.QPH){
                                    <div class="part2">
                                        <span class="icon-time iconfont"> @StringHelper.FormatDate(item.PublishTime, "MM/dd")</span>
                                        @*<span  class="icon-pinglun iconfont">
                                            @item.CommentCount</span>*@
                                        <span class="iconfont icon-view"> @item.ViewCount</span>
                                        @*<span class="iconfont icon-like"> @item.ClickGoodCount</span>*@
                                    </div>
                    }


                @if (Request["page"] != "sp")
                {
                    <div class="part3">
                        <a href="@(url)" class="word" target="_blank">
                            @StringHelper.CutText(item.Summary, 45)
                        </a>
                    </div>
                }

                @if (Request["page"] == "live" && item.LiveStatus == 0)
                {

                    <div class="status-tag bg0">预告</div>
                }

                @if (Request["page"] == "live" && item.LiveStatus == 1)
                {

                    <div class="status-tag bg1">直播</div>
                }

                @if (Request["page"] == "live" && item.LiveStatus == 2)
                {

                    <div class="status-tag bg2">复播</div>
                }
            </div>
        </div>
    }


    index++;
}

@*<div class="more">
        <div class="more_btn" at=1>点击加载更多</div>
    </div>*@

